package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 模拟一个自定页面的表单，该数据会关联到流程实例FrmData，可用于复杂页面的设计及后期的数据分析
 * @TableName frmleavereq
 */
@TableName(value ="frmleavereq")
@Data
public class Frmleavereq implements Serializable {
    /**
     * ID
     */
    @TableId
    private String id;

    /**
     * 请假人姓名
     */
    private String username;

    /**
     * 请假分类，病假，事假，公休等
     */
    private String requesttype;

    /**
     * 开始日期
     */
    private Date startdate;

    /**
     * 开始时间
     */
    private Date starttime;

    /**
     * 结束日期
     */
    private Date enddate;

    /**
     * 结束时间
     */
    private Date endtime;

    /**
     * 请假说明
     */
    private String requestcomment;

    /**
     * 附件，用于提交病假证据等
     */
    private String attachment;

    /**
     * 创建时间
     */
    private Date createdate;

    /**
     * 创建用户主键
     */
    private String createuserid;

    /**
     * 创建用户
     */
    private String createusername;

    /**
     * 所属流程ID
     */
    private String flowinstanceid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Frmleavereq other = (Frmleavereq) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getRequesttype() == null ? other.getRequesttype() == null : this.getRequesttype().equals(other.getRequesttype()))
            && (this.getStartdate() == null ? other.getStartdate() == null : this.getStartdate().equals(other.getStartdate()))
            && (this.getStarttime() == null ? other.getStarttime() == null : this.getStarttime().equals(other.getStarttime()))
            && (this.getEnddate() == null ? other.getEnddate() == null : this.getEnddate().equals(other.getEnddate()))
            && (this.getEndtime() == null ? other.getEndtime() == null : this.getEndtime().equals(other.getEndtime()))
            && (this.getRequestcomment() == null ? other.getRequestcomment() == null : this.getRequestcomment().equals(other.getRequestcomment()))
            && (this.getAttachment() == null ? other.getAttachment() == null : this.getAttachment().equals(other.getAttachment()))
            && (this.getCreatedate() == null ? other.getCreatedate() == null : this.getCreatedate().equals(other.getCreatedate()))
            && (this.getCreateuserid() == null ? other.getCreateuserid() == null : this.getCreateuserid().equals(other.getCreateuserid()))
            && (this.getCreateusername() == null ? other.getCreateusername() == null : this.getCreateusername().equals(other.getCreateusername()))
            && (this.getFlowinstanceid() == null ? other.getFlowinstanceid() == null : this.getFlowinstanceid().equals(other.getFlowinstanceid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getRequesttype() == null) ? 0 : getRequesttype().hashCode());
        result = prime * result + ((getStartdate() == null) ? 0 : getStartdate().hashCode());
        result = prime * result + ((getStarttime() == null) ? 0 : getStarttime().hashCode());
        result = prime * result + ((getEnddate() == null) ? 0 : getEnddate().hashCode());
        result = prime * result + ((getEndtime() == null) ? 0 : getEndtime().hashCode());
        result = prime * result + ((getRequestcomment() == null) ? 0 : getRequestcomment().hashCode());
        result = prime * result + ((getAttachment() == null) ? 0 : getAttachment().hashCode());
        result = prime * result + ((getCreatedate() == null) ? 0 : getCreatedate().hashCode());
        result = prime * result + ((getCreateuserid() == null) ? 0 : getCreateuserid().hashCode());
        result = prime * result + ((getCreateusername() == null) ? 0 : getCreateusername().hashCode());
        result = prime * result + ((getFlowinstanceid() == null) ? 0 : getFlowinstanceid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", username=").append(username);
        sb.append(", requesttype=").append(requesttype);
        sb.append(", startdate=").append(startdate);
        sb.append(", starttime=").append(starttime);
        sb.append(", enddate=").append(enddate);
        sb.append(", endtime=").append(endtime);
        sb.append(", requestcomment=").append(requestcomment);
        sb.append(", attachment=").append(attachment);
        sb.append(", createdate=").append(createdate);
        sb.append(", createuserid=").append(createuserid);
        sb.append(", createusername=").append(createusername);
        sb.append(", flowinstanceid=").append(flowinstanceid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}